package com.lyz.objectd3;

/**
 * @ClassName KeyBoard
 * @Description 键盘类实现USB接口
 * @Author 2214361854
 * @Date 2022/2/19 15:11
 * @Version 1.0
 */
public class KeyBoard implements USB{
    private String name;
    @Override
    public void connect() {
        System.out.println(name+"接入键盘");
    }

    @Override
    public void unconnect() {
        System.out.println(name+"拔出键盘");
    }

    public void KeyDown(){
        System.out.println(name+"敲击了键盘");
    }

    public KeyBoard() {
    }

    public KeyBoard(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
